package cn.gok.front.config;

import cn.hutool.cache.CacheUtil;
import cn.hutool.cache.impl.TimedCache;
import cn.hutool.core.date.DateUtil;

/**
 * @Author: chenfan
 * @Description:  在忘记密码功能中使用， 缓存放发送给用户的token凭证
 */
public class PasswordTokenCache {

    private static TimedCache<String,String> cache = CacheUtil.newTimedCache(360000);

    public static void putToken(String userName,String token){
        cache.put(userName,token, 600000);
    }

    public static void removeToken(String userName){
        cache.remove(userName);
    }
}
